package com.hanhai.material.device.entity;

import com.mybatisflex.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 *  实体类。
 *
 * @author youchuang
 * @since 2023/10/18 11:26:03
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "sys_work_plan",dataSource = "scheduling")
public class SysWorkPlan implements Serializable {
    @Id(keyType = KeyType.None)
    private String id;

    private String workPlanId;

    private String workPlanType;

    private String workShop;

    private String machineName;

    private String materialId;

    private String materialName;

    private String materialNum;

    private String productName;

    private Integer productNum;

    private Date generateDateTime;

    private String generateUser;

    private Date closeDateTime;

    private Date planStartTime;

    private Date planEndTime;

    private Date actualStartTime;

    private Date actualEndTime;

    @Column(onInsertValue = "now()")
    private Date createTime;
    @Column(onUpdateValue = "now()")
    private Date updateTime;

    private Integer productStatus;

    private String productId;

    private String workShopId;

    private String distributeManagerId;

    private String receiveManagerId;

    private String unitId;

    private String unitName;

    private Integer interId;

    private Integer sourceEntryId;

    private Integer tranTypeId;

    private Integer auxStockQty;

    private Integer auxInHightQty;

    private double auxInHightLimit;

    private Integer auxInLowQty;

    private double auxInLowLimit;

    private String shortName;

    private boolean isEnd;

    private String moldNo;

    private double moldNumber;

    private BigDecimal paperBoxNumber;

    private String exchangeType;

    private boolean moldSame;

    private Integer quantity;

    @RelationOneToOne(selfField = "interId",targetField = "productIcmoId",dataSource = "device")
    private SysBom bom;
    @RelationOneToOne(selfField = "productId",targetField = "productId")
    private SysProductInfo productInfo;


    @Column(ignore = true)
    private List<SysMaterialRecord> materialRecordList;
    @Column(ignore = true)
    private Date productDate;



}
